<?php
/**
 * ======================================================================
 * LICENSE: This file is subject to the terms and conditions defined in *
 * file 'license.txt', which is part of this source code package.       *
 * ======================================================================
 */
?>
<div class="wrap">
    <div class="postbox-container" style="width:70%;">
        <div class="metabox-holder">
            <div class="meta-box-sortables">
                <div class="postbox">
                    <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                    <h3 class="hndle">
                        <?php echo __('AAM Security', 'aam'); ?>
                    </h3>
                    <div class="inside main-inside">
                        <div class="mode-container" id="map_mode">
                            <?php if ($this->isGeoLookupOn()) { ?>
                                <div id="geo_map" style="width: 100%; height: 500px;"></div>
                            <?php } else { ?>
                                <p class="feature-off-notice">
                                    The Geo Lookup feature is off. Turn it on with ConfigPress.<br/>
                                    For more information check <a href="#" id="setting_trigger_inline">Settings</a> tab.
                                </p>
                            <?php } ?>
                        </div>
                        <div class="mode-container" id="settings_mode" style="display: none;">
                            <p>
                                In current version of AAM Security you have to utilize ConfigPress to trigger
                                certain features. Please find out below the list of all possible ConfigPress
                                settings:
                                <pre style="background:#fff;color:#000">
<span style="color:#05a;font-weight: bold;">[security]</span>
<span style="color:#00b418">#Geo Lookup feature monitors the location of the user based on IP address.</span>
<span style="color:#00b418">#By default this feature is deactivated and can be activated by changing.</span>
<span style="color:#00b418">#the <b>false</b> to <b>true</b>.</span>
<span style="color:#0100b6;font-weight:700;">login.geo_lookup</span> = <span style="color:#d80800">"false"</span>
<span style="color:#00b418">#We are using FreeGeoIP.net webservice to retrieve the geo location based on</span>
<span style="color:#00b418">#IP address. Currently this is the only option but we will extend the list of</span>
<span style="color:#00b418">#possible options in future releases.</span>
<span style="color:#0100b6;font-weight:700">login.geoip.service</span> = <span style="color:#d80800">"FreeGeoIP"</span>
<span style="color:#00b418">#Login lockout feature control the admin login process. This prevent your</span>
<span style="color:#00b418">#website from being hacked by trying different password combinations.</span>
<span style="color:#0100b6;font-weight:700">login.lockout</span> = <span style="color:#d80800">"false"</span>
<span style="color:#00b418">#This setting defines how many attempts user has for entering correct password</span>
<span style="color:#00b418">#before the <b>attempt failure</b> procedure fires.</span>
<span style="color:#0100b6;font-weight:700">login.attempts</span> = <span style="color:#d80800">"10"</span>
<span style="color:#00b418">#Attempt failure procedure is fired after user excided the number of attempts</span>
<span style="color:#00b418">#to enter correct password. By default the server starts slowdown the each </span>
<span style="color:#00b418">#new request for 5 seconds. Another possible procedure is <b>die</b>.</span>
<span style="color:#00b418">#In this case the login process is completely locked for user's IP address.</span>
<span style="color:#0100b6;font-weight:700">login.attempt_failure</span> = <span style="color:#d80800">"slowdown"</span>
<span style="color:#00b418">#By default every new login request slows down for 5 seconds.</span>
<span style="color:#0100b6;font-weight:700">login.slowdown_time</span> = <span style="color:#d80800">"5"</span>
<span style="color:#00b418">#If <b>attempt failure</b> procedure is <b>die</b>, you can define your own</span>
<span style="color:#00b418">#custom message that will be shown for locked user.</span>
<span style="color:#0100b6;font-weight:700">login.die_message</span> = <span style="color:#d80800">"You are not allowed to login"</span>
<span style="color:#00b418">#To speedup the lookup and lockout feature, all IP addresses are cached to database.</span>
<span style="color:#00b418">#By default AAM caches up to 1000 records.</span>
<span style="color:#0100b6;font-weight:700">login.cache_limit</span> = <span style="color:#d80800">"1000"</span>
                            </pre>
                            </p>
                            <p style="font-size: 0.9em;">
                                AAM Security is very new but expecting to be one of the biggest features 
                                in AAM plugin. Currently it can be considered on development stage so some of
                                the features might not work the way you expect.<br/>
                                We are expecting feedback and recommendations from you how to expend and improve 
                                AAM Security feature. Please send your thoughts to our email box 
                                <a href="mailto:support@wpaam.com">support@wpaam.com</a>.
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php if (aam_Core_Console::hasIssues()) { ?>
        <div class="postbox-container" style="width:25%; margin-left: 2%;">
            <div class="metabox-holder">
                <div class="meta-box-sortables">
                    <div class="postbox">
                        <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                        <h3 class="hndle">
                            <span><?php echo __('AAM Warnings', 'aam'); ?></span>
                        </h3>
                        <div class="inside">
                            <?php foreach (aam_Core_Console::getWarnings() as $warning) { ?>
                                <div class="aam-warning"><span><?php echo $warning; ?></span></div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php } ?>

    <div class="postbox-container" style="width:25%; margin-left: 2%;">
        <div class="metabox-holder" id="control_panel">
            <div class="meta-box-sortables">
                <div class="postbox">
                    <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                    <h3 class="hndle">
                        <span><?php echo __('Control Panel', 'aam'); ?></span>
                    </h3>
                    <div class="inside">
                        <div class="large-icons-row">
                            <a href="#" class="aam-icon aam-icon-large aam-icon-large-glob" mode="map">
                                <span></span><?php echo __('Map', 'aam'); ?>
                            </a>
                            <!--<a href="#" class="cpanel-item cpanel-item-graph" ><?php echo __('Graph', 'aam'); ?></a>-->
                            <a href="#" class="aam-icon aam-icon-large aam-icon-large-settings" mode="settings" >
                                <span></span><?php echo __('Settings', 'aam'); ?>
                            </a>
                        </div>
                        <div class="medium-icons-row">
                            <a href="https://twitter.com/wpaam" target="_blank" class="aam-icon aam-icon-medium aam-icon-medium-twitter" aam-tooltip="<?php echo __('Follow @wpaam', 'aam'); ?>"><span></span><?php echo __('Follow', 'aam'); ?></a>
                            <a href="http://wpaam.com/support" target="_blank" class="aam-icon aam-icon-medium aam-icon-medium-help" aam-tooltip="<?php echo __('Help Forum', 'aam'); ?>"><span></span><?php echo __('Help', 'aam'); ?></a>
                            <a href="#" class="aam-icon aam-icon-medium aam-icon-medium-message" id="aam_message" aam-tooltip="<?php echo __('E-mail Us', 'aam'); ?>"><span></span><?php echo __('E-mail Us', 'aam'); ?></a>
                            <a href="http://wordpress.org/support/view/plugin-reviews/advanced-access-manager" target="_blank" class="aam-icon aam-icon-medium aam-icon-medium-star" aam-tooltip="<?php echo __('Rate AAM', 'aam'); ?>"><span></span><?php echo __('Rate Us', 'aam'); ?></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php if (false && $this->isGeoLookupOn()) { ?>
        <div class="postbox-container" style="width:25%; margin-left: 2%;">
            <div class="metabox-holder">
                <div class="meta-box-sortables">
                    <div class="postbox">
                        <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                        <h3 class="hndle">
                            <span><?php echo __('Country Impact List', 'aam'); ?></span>
                        </h3>
                        <div class="inside">
                            <table class="dataTable" id="country_list">
                                <thead>
                                    <tr>
                                        <th width="80%">Country</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php } ?>
    <br class="clear" />
</div>